import request from "@/utils/http";

/**
 * 添加收货地址
 */
export const addAddressAPI = (data) => {
    return request({
        url: "/member/address",
        method: "post",
        data,
    });
};

/**
 * 根据id获取地址详情 
 */
export const getAddressDetailAPI = (id) => {
    return request({
        url: `/member/address/${id}`
    });
};
/**
 * 更新收货地址
 */
export const updateAddressAPI = (id, data) => {
    return request({
        url: `/member/address/${id}`,
        method: "put",
        data,
    });
};